using ASP;
using HoWave.Common;
using HoWave.Data;
using System;
using System.Collections;
using System.Web.Profile;
using System.Web.UI;
using System.Web.UI.WebControls;
using Wuqi.Webdiyer;
public class UserControls_ShowEvaluation : UserControl
{
	protected Repeater Repeater_Evaluation;
	protected AspNetPager AspNetPager1;
	protected DefaultProfile Profile
	{
		get
		{
			return (DefaultProfile)this.Context.Profile;
		}
	}
	protected global_asax ApplicationInstance
	{
		get
		{
			return (global_asax)this.Context.ApplicationInstance;
		}
	}
	protected void Page_Load(object sender, EventArgs e)
	{
		if (!base.IsPostBack)
		{
			this.dtEvaluationBind();
		}
	}
	protected void dtEvaluationBind()
	{
		Hashtable hashtable = new Hashtable();
		hashtable.Add("tblName", " [HLShop_Comment] as C,[HLShop_Product] as P,[HLShop_Shop] as S");
		hashtable.Add("seleName", "C.Id,C.UserName,P.ProductName,C.[DateTime],C.[Level],C.State,C.[Content],C.ShopID,C.ProductID");
		hashtable.Add("fldName", "DateTime");
		hashtable.Add("PageSize", 10);
		hashtable.Add("PageIndex", this.AspNetPager1.CurrentPageIndex);
		hashtable.Add("IsCount", 0);
		hashtable.Add("OrderType", 1);
		hashtable.Add("strWhere", "S.ShopID=C.ShopID AND C.ShopID=P.ShopID AND C.ProductID=P.ProductID AND C.ProductID= " + Fetch.GetID("ProductID"));
		Pager pager = new Pager();
		this.Repeater_Evaluation.DataSource = pager.Query(hashtable);
		this.Repeater_Evaluation.DataBind();
		this.AspNetPager1.AlwaysShow = true;
		this.AspNetPager1.PageSize = 10;
		hashtable.Remove("IsCount");
		hashtable.Add("IsCount", 1);
		this.AspNetPager1.RecordCount = pager.QueryRecordCount(hashtable);
	}
	protected void AspNetPager1_PageChanged(object sender, EventArgs e)
	{
		this.dtEvaluationBind();
	}
}
